import { useState } from "react"

export function useTheme(defaultDark = false) {
  const [isDarkMode, setIsDarkMode] = useState(defaultDark)
  const toggleTheme = () => setIsDarkMode((prev) => !prev)
  return { isDarkMode, toggleTheme }
}
